]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lookingGlass: Use lookingGlass dialog for modal grab
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 17 Nov 2021 23:38:11 +0000 (00:38 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 29 Jan 2022 00:16:29 +0000 (01:16 +0100)
We want the whole dialog to handle events while shown. To compensate
for the entry not being "grabbed", make it take focus when showing.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>

js/ui/lookingGlass.js

index b3e7f2117888e3a50b3b4c7b3acf6a6772bf66f5..93d08f3fa8bed62e96ae6cf59535ff7a49d3bc2b 100644 (file)
@@ -1560,7 +1560,7 @@ class LookingGlass extends St.BoxLayout {
         if (this._open)
             return;
 
-        if (!Main.pushModal(this._entry, { actionMode: Shell.ActionMode.LOOKING_GLASS }))
+        if (!Main.pushModal(this, { actionMode: Shell.ActionMode.LOOKING_GLASS }))
             return;
 
         this._notebook.selectIndex(0);
@@ -1580,6 +1580,7 @@ class LookingGlass extends St.BoxLayout {
         });
 
         this._windowList.update();
+        this._entry.grab_key_focus();
     }
 
     close() {
@@ -1601,7 +1602,7 @@ class LookingGlass extends St.BoxLayout {
             duration,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
             onComplete: () => {
-                Main.popModal(this._entry);
+                Main.popModal(this);
                 this.hide();
             },
         });